import { ref, onMounted } from 'vue'
import { RequestAllTypes } from '@/api/path/index.js'
export const Details = () => {
    onMounted(()=>{
        optionsList()
    })
    // 文章大类
    const article_options = ref<any>([])
    const type_options = ref<any>([])
    /**
     * 获取子标题列表
     */
    const optionsList = async () => {
        const a = await RequestAllTypes()
        console.log('获取子标题成功',a)
        for(let i = 0; i < a.resultObj.length; i++){
            type_options.value.push({value:'',lable:''})
            type_options.value[i].value=a.resultObj[i],
            type_options.value[i].lable = a.resultObj[i]
        }
        console.log('分类',type_options.value)
        // article_options.value = a.rows
    }

    // 状态大类
    const status_options = [
        {
            value: '0',
            label: '已删除',
        },
        {
            value: '1',
            label: '已发布',
        },
        {
            value: '2',
            label: '已禁止',
        },
        {
            value: '3',
            label: '未发布',
        },
    ]
    // 搜索栏数据
    
    // const paramValue = ref('page:1,size:1,')
    

    
    return {
        type_options,
        article_options,
        status_options,
    }
}
